#ifndef __AXP2101_H__
#define __AXP2101_H__

#include "driver/i2c.h"

#define AXP2101_DEBUG 1

#define AXP2101_IRQ_PIN -1
#define AXP2101_PWROK_PIN -1
#define AXP2101_I2C_MASTET_NUM I2C_MASTER_NUM

#define AXP2101_ADDRSSS 0x34

#define PMU_STATUS_1_REG 0x00
#define PMU_STATUS_2_REG 0x01
#define PMU_COMMON_COFIG_REG 0x10
#define BATFET_CONTROL_REG 0x12
#define CHARGER_FUL_WATCHDOG_CTRL_REG 0x18
#define BATTERY_PER_DATA_REG 0xA4
#define ICC_CHARGER_SETTING_REG 0x62

#ifdef __cplusplus
extern "C"
{
#endif

    esp_err_t axp2101_init(void);
    uint8_t axp2101_bat_level(void);
    bool axp2101_is_charging(void);
    bool axp2101_is_charge_done(void);
    void axp2101_pwr_off(void);
    void axp2101_task(void *arg);

#ifdef __cplusplus
}
#endif

#endif
